#pragma once

#include <algorithm/analytical_model/algorithm/cuda/inter_op/Data.h>

#include <memory>
#include <vector>

namespace solar::cuda
{
    class Grid;
}

namespace solar::cuda::inter_op
{
    class RectangleHeliostat;

    class Grid
    {
        public:
            virtual ~Grid() = default;
            // Grid();
            [[nodiscard]] virtual auto
            gridHelioMatch(const std::vector<RectangleHeliostat>& heliostats) const -> int = 0;
            virtual void init() const = 0;
            virtual void clear() const = 0;
            [[nodiscard]] auto getType() const -> GridType;
            [[nodiscard]] auto getPosition() const -> Float3;
            void setPosition(const Float3& pos) const;
            [[nodiscard]] auto getSize() const -> Float3;
            void setSize(const Float3& size) const;
            [[nodiscard]] auto getInterval() const -> Float3;
            void setInterval(const Float3& interval) const;
            [[nodiscard]] auto getNumHeliostats() const -> int;
            void setNumHeliostats(int num) const;
            [[nodiscard]] auto getBelongingReceiverIndex() const -> int;
            void setBelongingReceiverIndex(int index) const;
            [[nodiscard]] auto getStartHeliostatIndex() const -> int;
            void setStartHeliostatIndex(int index) const;

        protected:
            std::shared_ptr<solar::cuda::Grid> delegate_ptr_;
    };
} // namespace solar::cuda::inter_op
